import { VOTE_SUP, VOTE_OPP } from '../actionTypes'
const initialState = {
	sup: 0,
	opp: 0
}

export default function vote (state = initialState, action) {
	switch (action.type) {
		case VOTE_SUP:
			return { ...state, sup: state.sup + 1 }
		case VOTE_OPP:
			return { ...state, opp: state.opp + 1 }
		default:
			return state
	}
}